home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / RCS / sig.h,v < prev    next >
Encoding:
Text File  |  1992-04-08  |  6.5 KB  |  282 lines

  1. head     1.5;
  2. branch   ;
  3. access   ;
  4. symbols  sprited:1.4.1;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.5
  10. date     92.04.08.14.42.12;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.4;
  13.  
  14. 1.4
  15. date     89.07.31.17.41.18;  author mgbaker;  state Exp;
  16. branches 1.4.1.1;
  17. next     1.3;
  18.  
  19. 1.3
  20. date     89.06.16.13.16.26;  author rab;  state Exp;
  21. branches ;
  22. next     1.2;
  23.  
  24. 1.2
  25. date     89.01.27.09.27.38;  author brent;  state Exp;
  26. branches ;
  27. next     1.1;
  28.  
  29. 1.1
  30. date     88.06.21.09.36.55;  author ouster;  state Exp;
  31. branches ;
  32. next     ;
  33.  
  34. 1.4.1.1
  35. date     91.09.13.18.34.14;  author kupfer;  state Exp;
  36. branches ;
  37. next     ;
  38.  
  39.  
  40. desc
  41. @@
  42.  
  43.  
  44. 1.5
  45. log
  46. @Add names for UNIX compatibility signals (SIG_IO_READY,
  47. SIG_WINDOW_CHANGE, etc.).
  48. @
  49. text
  50. @/*
  51.  * sig.h --
  52.  *
  53.  *     Data structures and used by the signal module for user system
  54.  *     calls.
  55.  *
  56.  * Copyright (C) 1985, 1988 Regents of the University of California
  57.  * Permission to use, copy, modify, and distribute this
  58.  * software and its documentation for any purpose and without
  59.  * fee is hereby granted, provided that the above copyright
  60.  * notice appear in all copies.  The University of California
  61.  * makes no representations about the suitability of this
  62.  * software for any purpose.  It is provided "as is" without
  63.  * express or implied warranty.
  64.  *
  65.  * $Header: /sprite/src/lib/include/RCS/sig.h,v 1.4 89/07/31 17:41:18 mgbaker Exp Locker: kupfer $ SPRITE (Berkeley)
  66.  */
  67.  
  68. #ifndef _SIGUSER
  69. #define _SIGUSER
  70.  
  71. /*
  72.  * The different actions for signals.
  73.  * SIG_IGNORE_ACTION    Ignore the signal.
  74.  * SIG_KILL_ACTION    Kill the process.
  75.  * SIG_DEBUG_ACTION    Enter the debugger for the process.
  76.  * SIG_DEFAULT_ACTION    Take the default action.
  77.  * SIG_HANDLE_ACTION    Call a signal handler for the process.
  78.  * SIG_MIGRATE_ACTION    Migrate the process to another node.  The node
  79.  *                must have already been set.
  80.  * SIG_SUSPEND_ACTION    Suspend execution of the process.
  81.  */
  82. #define    SIG_IGNORE_ACTION    0
  83. #define    SIG_KILL_ACTION        1
  84. #define    SIG_DEBUG_ACTION    2
  85. #define    SIG_DEFAULT_ACTION    3
  86. #define    SIG_HANDLE_ACTION    4
  87. #define    SIG_MIGRATE_ACTION    5
  88. #define    SIG_SUSPEND_ACTION    6
  89.  
  90. #define    SIG_NUM_ACTIONS        7
  91.  
  92. /*
  93.  * The structure to use to specify the action to take for a signal.
  94.  */
  95. typedef    struct {
  96.     int        action;
  97.     int        (*handler)();
  98.     int        sigHoldMask;
  99. } Sig_Action;
  100.  
  101. /*
  102.  * The different signals.
  103.  *
  104.  * SIG_DEBUG        Enter the debugger.
  105.  * SIG_ARITH_FAULT    Arithmetic instruction fault (e.g., division by zero).
  106.  * SIG_ILL_INST        Illegal instruction.
  107.  * SIG_ADDR_FAULT    Bad operand address.
  108.  * SIG_KILL        Kill the process.
  109.  * SIG_INTERRUPT    Interrupt the process.
  110.  * SIG_BREAKPOINT    A breakpoint trap exception.
  111.  * SIG_TRACE_TRAP    A trace trap exception.
  112.  * SIG_MIGRATE_TRAP    A migration trap exception (privileged).
  113.  * SIG_MIGRATE_HOME    Signal a process to return home after migration.
  114.  * SIG_SUSPEND        Suspend execution.
  115.  * SIG_RESUME        Resume execution after being suspended.
  116.  * SIG_TTY_INPUT    Signal to a background process that tries to read
  117.  *            from the tty.
  118.  * SIG_PIPE        The reader of a pipe has died.
  119.  * SIG_TIMER        An timer set with Proc_SetIntTimer has expired.
  120.  * SIG_URGENT        Urgent condition (i.e., out-of-band data) is present 
  121.  *            on a socket
  122.  * SIG_CHILD        A child's status has changed.
  123.  * SIG_TERM        Software termination.
  124.  * SIG_TTY_SUSPEND    Suspend signal from keyboard.
  125.  * SIG_TTY_OUTPUT    Signal to a background process that tries to write
  126.  *            to the tty when that has been dis-allowed.
  127.  * 
  128.  * The following signals aren't used by Sprite.  They exist for UNIX 
  129.  * compatibility.
  130.  * 
  131.  * SIG_IO_READY        (SIGIO) - Input/output is possible.
  132.  * SIG_WINDOW_CHANGE    (SIGWINCH) - A window has changed size.
  133.  * SIG_IOT        (SIGIOT) - IOT instruction
  134.  * SIG_EMT        (SIGEMT) - EMT instruction
  135.  * SIG_USER1        (SIGUSR1) - user-defined signal #1
  136.  * SIG_USER2        (SIGUSR2) - user-defined signal #2
  137.  */
  138. #define    SIG_DEBUG        1
  139. #define    SIG_ARITH_FAULT        2
  140. #define    SIG_ILL_INST        3
  141. #define    SIG_ADDR_FAULT        4
  142. #define    SIG_KILL        5
  143. #define    SIG_INTERRUPT        6
  144. #define    SIG_BREAKPOINT        7
  145. #define    SIG_TRACE_TRAP        8
  146. #define    SIG_MIGRATE_TRAP     9
  147. #define    SIG_MIGRATE_HOME     10
  148. #define    SIG_SUSPEND        11
  149. #define    SIG_RESUME        12
  150. #define    SIG_TTY_INPUT        13
  151. #define SIG_PIPE        14
  152. #define SIG_TIMER        15
  153. #define SIG_URGENT        16
  154. #define SIG_CHILD        17
  155. #define SIG_TERM        18
  156. #define    SIG_TTY_SUSPEND        19
  157. #define SIG_TTY_OUTPUT        20
  158. #define SIG_IO_READY        26
  159. #define SIG_WINDOW_CHANGE    27
  160. #define SIG_IOT            28
  161. #define SIG_EMT            29
  162. #define SIG_USER1        30
  163. #define SIG_USER2        31
  164.  
  165. /*
  166.  * Define the bounds on signals.
  167.  *
  168.  * SIG_MIN_SIGNAL            The smallest valid signal.
  169.  * SIG_LAST_RESERVED_SIGNAL        All signals after this one can be user
  170.  *                    defined.
  171.  * SIG_NUM_SIGNALS            The total number of signals.
  172.  */
  173. #define    SIG_MIN_SIGNAL            1
  174. #define    SIG_LAST_RESERVED_SIGNAL    SIG_TTY_OUTPUT
  175. #define    SIG_NUM_SIGNALS            32
  176.  
  177. /*
  178.  * A code of zero indicates that there is no code for the signal.
  179.  */
  180. #define    SIG_NO_CODE        -1
  181.  
  182. /*
  183.  * The different standard codes for an illegal instruction signal
  184.  *
  185.  * SIG_ILL_INST_CODE    This was actually an illegal instruction.
  186.  * SIG_BAD_SYS_CALL    A bad system call number was passed to a system call
  187.  *            trap.
  188.  * SIG_BAD_TRAP        An illegal trap instruction was executed.
  189.  * SIG_PRIV_INST    A privledged instruction was executed.
  190.  */
  191. #define    SIG_ILL_INST_CODE    0
  192. #define    SIG_BAD_SYS_CALL    1
  193. #define    SIG_BAD_TRAP        2
  194. #define    SIG_PRIV_INST        3
  195.  
  196. /*
  197.  * The different standard codes for an address fault.
  198.  *
  199.  * SIG_ACCESS_VIOL    The address accesses a protected area of memory.
  200.  * SIG_ADDR_ERROR     The operand address is on an improper boundary.
  201.  */
  202. #define    SIG_ACCESS_VIOL        0
  203. #define    SIG_ADDR_ERROR        1
  204.  
  205. /*
  206.  * The standard codes for an arithmetic fault.
  207.  *
  208.  * SIG_ZERO_DIV        Division by zero.
  209.  */
  210. #define    SIG_ZERO_DIV        0
  211.  
  212. #endif /* _SIGUSER */
  213. @
  214.  
  215.  
  216. 1.4
  217. log
  218. @Removed reference to unnecessary header file.
  219. @
  220. text
  221. @d16 1
  222. a16 1
  223.  * $Header: /sprite/src/lib/include/RCS/sig.h,v 1.3 89/06/16 13:16:26 rab Exp Locker: mgbaker $ SPRITE (Berkeley)
  224. d78 10
  225. d109 6
  226. @
  227.  
  228.  
  229. 1.4.1.1
  230. log
  231. @Initial branch for Sprite server.
  232. @
  233. text
  234. @d16 1
  235. a16 1
  236.  * $Header: /sprite/src/lib/include/RCS/sig.h,v 1.4 89/07/31 17:41:18 mgbaker Exp $ SPRITE (Berkeley)
  237. @
  238.  
  239.  
  240. 1.3
  241. log
  242. @*** empty log message ***
  243. @
  244. text
  245. @d16 1
  246. a16 1
  247.  * $Header: /sprite/src/lib/include/RCS/sig.h,v 1.2 89/01/27 09:27:38 brent Exp Locker: rab $ SPRITE (Berkeley)
  248. a20 2
  249.  
  250. #include "sigMach.h"
  251. @
  252.  
  253.  
  254. 1.2
  255. log
  256. @Added SIG_TTY_OUTPUT
  257. @
  258. text
  259. @d16 1
  260. a16 1
  261.  * $Header: /sprite/src/lib/include/RCS/sig.h,v 1.1 88/06/21 09:36:55 ouster Exp Locker: brent $ SPRITE (Berkeley)
  262. d149 1
  263. a149 1
  264. #endif _SIGUSER
  265. @
  266.  
  267.  
  268. 1.1
  269. log
  270. @Initial revision
  271. @
  272. text
  273. @d16 1
  274. a16 1
  275.  * $Header: sig.h,v 2.1 87/10/14 19:13:32 nelson Exp $ SPRITE (Berkeley)
  276. d78 2
  277. d100 1
  278. d111 1
  279. a111 1
  280. #define    SIG_LAST_RESERVED_SIGNAL    SIG_TTY_SUSPEND
  281. @
  282.